<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TablePortfolio class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TablePortfolio object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TablePortfolioMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TablePortfolio $TablePortfolio the actual TablePortfolio data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QIntegerTextBox $BoothIdControl
	 * property-read QLabel $BoothIdLabel
	 * property QIntegerTextBox $CategoryIdControl
	 * property-read QLabel $CategoryIdLabel
	 * property QIntegerTextBox $SubcategoryIdControl
	 * property-read QLabel $SubcategoryIdLabel
	 * property QIntegerTextBox $ColorsIdControl
	 * property-read QLabel $ColorsIdLabel
	 * property QIntegerTextBox $FeelsIdControl
	 * property-read QLabel $FeelsIdLabel
	 * property QIntegerTextBox $PortfolioCategoryIdControl
	 * property-read QLabel $PortfolioCategoryIdLabel
	 * property QTextBox $TitleControl
	 * property-read QLabel $TitleLabel
	 * property QTextBox $PortfolioImageControl
	 * property-read QLabel $PortfolioImageLabel
	 * property QTextBox $PortfolioThumnailControl
	 * property-read QLabel $PortfolioThumnailLabel
	 * property QTextBox $FilenameControl
	 * property-read QLabel $FilenameLabel
	 * property QTextBox $FilenameThumnailControl
	 * property-read QLabel $FilenameThumnailLabel
	 * property QTextBox $UrlControl
	 * property-read QLabel $UrlLabel
	 * property QTextBox $UrlThumnailControl
	 * property-read QLabel $UrlThumnailLabel
	 * property QTextBox $Keyword1Control
	 * property-read QLabel $Keyword1Label
	 * property QTextBox $Keyword2Control
	 * property-read QLabel $Keyword2Label
	 * property QTextBox $Keyword3Control
	 * property-read QLabel $Keyword3Label
	 * property QTextBox $Keyword4Control
	 * property-read QLabel $Keyword4Label
	 * property QTextBox $Keyword5Control
	 * property-read QLabel $Keyword5Label
	 * property QTextBox $Keyword6Control
	 * property-read QLabel $Keyword6Label
	 * property QTextBox $Keyword7Control
	 * property-read QLabel $Keyword7Label
	 * property QTextBox $Keyword8Control
	 * property-read QLabel $Keyword8Label
	 * property QTextBox $Keyword9Control
	 * property-read QLabel $Keyword9Label
	 * property QTextBox $Keyword10Control
	 * property-read QLabel $Keyword10Label
	 * property QDateTimePicker $RegisterDateControl
	 * property-read QLabel $RegisterDateLabel
	 * property QIntegerTextBox $StatusControl
	 * property-read QLabel $StatusLabel
	 * property QTextBox $ActiveControl
	 * property-read QLabel $ActiveLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TablePortfolioMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTablePortfolio;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TablePortfolio's individual data fields
		protected $lblId;
		protected $lstUser;
		protected $txtBoothId;
		protected $txtCategoryId;
		protected $txtSubcategoryId;
		protected $txtColorsId;
		protected $txtFeelsId;
		protected $txtPortfolioCategoryId;
		protected $txtTitle;
		protected $txtPortfolioImage;
		protected $txtPortfolioThumnail;
		protected $txtFilename;
		protected $txtFilenameThumnail;
		protected $txtUrl;
		protected $txtUrlThumnail;
		protected $txtKeyword1;
		protected $txtKeyword2;
		protected $txtKeyword3;
		protected $txtKeyword4;
		protected $txtKeyword5;
		protected $txtKeyword6;
		protected $txtKeyword7;
		protected $txtKeyword8;
		protected $txtKeyword9;
		protected $txtKeyword10;
		protected $calRegisterDate;
		protected $txtStatus;
		protected $txtActive;

		// Controls that allow the viewing of TablePortfolio's individual data fields
		protected $lblUserId;
		protected $lblBoothId;
		protected $lblCategoryId;
		protected $lblSubcategoryId;
		protected $lblColorsId;
		protected $lblFeelsId;
		protected $lblPortfolioCategoryId;
		protected $lblTitle;
		protected $lblPortfolioImage;
		protected $lblPortfolioThumnail;
		protected $lblFilename;
		protected $lblFilenameThumnail;
		protected $lblUrl;
		protected $lblUrlThumnail;
		protected $lblKeyword1;
		protected $lblKeyword2;
		protected $lblKeyword3;
		protected $lblKeyword4;
		protected $lblKeyword5;
		protected $lblKeyword6;
		protected $lblKeyword7;
		protected $lblKeyword8;
		protected $lblKeyword9;
		protected $lblKeyword10;
		protected $lblRegisterDate;
		protected $lblStatus;
		protected $lblActive;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TablePortfolioMetaControl to edit a single TablePortfolio object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TablePortfolio object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePortfolioMetaControl
		 * @param TablePortfolio $objTablePortfolio new or existing TablePortfolio object
		 */
		 public function __construct($objParentObject, TablePortfolio $objTablePortfolio) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TablePortfolioMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TablePortfolio object
			$this->objTablePortfolio = $objTablePortfolio;

			// Figure out if we're Editing or Creating New
			if ($this->objTablePortfolio->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePortfolioMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TablePortfolio object creation - defaults to CreateOrEdit
 		 * @return TablePortfolioMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTablePortfolio = TablePortfolio::Load($intId);

				// TablePortfolio was found -- return it!
				if ($objTablePortfolio)
					return new TablePortfolioMetaControl($objParentObject, $objTablePortfolio);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TablePortfolio object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TablePortfolioMetaControl($objParentObject, new TablePortfolio());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePortfolioMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TablePortfolio object creation - defaults to CreateOrEdit
		 * @return TablePortfolioMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TablePortfolioMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePortfolioMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TablePortfolio object creation - defaults to CreateOrEdit
		 * @return TablePortfolioMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TablePortfolioMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTablePortfolio->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTablePortfolio->User) && ($this->objTablePortfolio->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTablePortfolio->User) ? $this->objTablePortfolio->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QIntegerTextBox txtBoothId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtBoothId_Create($strControlId = null) {
			$this->txtBoothId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtBoothId->Name = QApplication::Translate('Booth Id');
			$this->txtBoothId->Text = $this->objTablePortfolio->BoothId;
			$this->txtBoothId->Required = true;
			return $this->txtBoothId;
		}

		/**
		 * Create and setup QLabel lblBoothId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblBoothId_Create($strControlId = null, $strFormat = null) {
			$this->lblBoothId = new QLabel($this->objParentObject, $strControlId);
			$this->lblBoothId->Name = QApplication::Translate('Booth Id');
			$this->lblBoothId->Text = $this->objTablePortfolio->BoothId;
			$this->lblBoothId->Required = true;
			$this->lblBoothId->Format = $strFormat;
			return $this->lblBoothId;
		}

		/**
		 * Create and setup QIntegerTextBox txtCategoryId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtCategoryId_Create($strControlId = null) {
			$this->txtCategoryId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtCategoryId->Name = QApplication::Translate('Category Id');
			$this->txtCategoryId->Text = $this->objTablePortfolio->CategoryId;
			return $this->txtCategoryId;
		}

		/**
		 * Create and setup QLabel lblCategoryId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblCategoryId_Create($strControlId = null, $strFormat = null) {
			$this->lblCategoryId = new QLabel($this->objParentObject, $strControlId);
			$this->lblCategoryId->Name = QApplication::Translate('Category Id');
			$this->lblCategoryId->Text = $this->objTablePortfolio->CategoryId;
			$this->lblCategoryId->Format = $strFormat;
			return $this->lblCategoryId;
		}

		/**
		 * Create and setup QIntegerTextBox txtSubcategoryId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtSubcategoryId_Create($strControlId = null) {
			$this->txtSubcategoryId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtSubcategoryId->Name = QApplication::Translate('Subcategory Id');
			$this->txtSubcategoryId->Text = $this->objTablePortfolio->SubcategoryId;
			return $this->txtSubcategoryId;
		}

		/**
		 * Create and setup QLabel lblSubcategoryId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblSubcategoryId_Create($strControlId = null, $strFormat = null) {
			$this->lblSubcategoryId = new QLabel($this->objParentObject, $strControlId);
			$this->lblSubcategoryId->Name = QApplication::Translate('Subcategory Id');
			$this->lblSubcategoryId->Text = $this->objTablePortfolio->SubcategoryId;
			$this->lblSubcategoryId->Format = $strFormat;
			return $this->lblSubcategoryId;
		}

		/**
		 * Create and setup QIntegerTextBox txtColorsId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtColorsId_Create($strControlId = null) {
			$this->txtColorsId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtColorsId->Name = QApplication::Translate('Colors Id');
			$this->txtColorsId->Text = $this->objTablePortfolio->ColorsId;
			return $this->txtColorsId;
		}

		/**
		 * Create and setup QLabel lblColorsId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblColorsId_Create($strControlId = null, $strFormat = null) {
			$this->lblColorsId = new QLabel($this->objParentObject, $strControlId);
			$this->lblColorsId->Name = QApplication::Translate('Colors Id');
			$this->lblColorsId->Text = $this->objTablePortfolio->ColorsId;
			$this->lblColorsId->Format = $strFormat;
			return $this->lblColorsId;
		}

		/**
		 * Create and setup QIntegerTextBox txtFeelsId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtFeelsId_Create($strControlId = null) {
			$this->txtFeelsId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtFeelsId->Name = QApplication::Translate('Feels Id');
			$this->txtFeelsId->Text = $this->objTablePortfolio->FeelsId;
			return $this->txtFeelsId;
		}

		/**
		 * Create and setup QLabel lblFeelsId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblFeelsId_Create($strControlId = null, $strFormat = null) {
			$this->lblFeelsId = new QLabel($this->objParentObject, $strControlId);
			$this->lblFeelsId->Name = QApplication::Translate('Feels Id');
			$this->lblFeelsId->Text = $this->objTablePortfolio->FeelsId;
			$this->lblFeelsId->Format = $strFormat;
			return $this->lblFeelsId;
		}

		/**
		 * Create and setup QIntegerTextBox txtPortfolioCategoryId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtPortfolioCategoryId_Create($strControlId = null) {
			$this->txtPortfolioCategoryId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtPortfolioCategoryId->Name = QApplication::Translate('Portfolio Category Id');
			$this->txtPortfolioCategoryId->Text = $this->objTablePortfolio->PortfolioCategoryId;
			return $this->txtPortfolioCategoryId;
		}

		/**
		 * Create and setup QLabel lblPortfolioCategoryId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblPortfolioCategoryId_Create($strControlId = null, $strFormat = null) {
			$this->lblPortfolioCategoryId = new QLabel($this->objParentObject, $strControlId);
			$this->lblPortfolioCategoryId->Name = QApplication::Translate('Portfolio Category Id');
			$this->lblPortfolioCategoryId->Text = $this->objTablePortfolio->PortfolioCategoryId;
			$this->lblPortfolioCategoryId->Format = $strFormat;
			return $this->lblPortfolioCategoryId;
		}

		/**
		 * Create and setup QTextBox txtTitle
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtTitle_Create($strControlId = null) {
			$this->txtTitle = new QTextBox($this->objParentObject, $strControlId);
			$this->txtTitle->Name = QApplication::Translate('Title');
			$this->txtTitle->Text = $this->objTablePortfolio->Title;
			$this->txtTitle->Required = true;
			$this->txtTitle->MaxLength = TablePortfolio::TitleMaxLength;
			return $this->txtTitle;
		}

		/**
		 * Create and setup QLabel lblTitle
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTitle_Create($strControlId = null) {
			$this->lblTitle = new QLabel($this->objParentObject, $strControlId);
			$this->lblTitle->Name = QApplication::Translate('Title');
			$this->lblTitle->Text = $this->objTablePortfolio->Title;
			$this->lblTitle->Required = true;
			return $this->lblTitle;
		}

		/**
		 * Create and setup QTextBox txtPortfolioImage
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtPortfolioImage_Create($strControlId = null) {
			$this->txtPortfolioImage = new QTextBox($this->objParentObject, $strControlId);
			$this->txtPortfolioImage->Name = QApplication::Translate('Portfolio Image');
			$this->txtPortfolioImage->Text = $this->objTablePortfolio->PortfolioImage;
			$this->txtPortfolioImage->TextMode = QTextMode::MultiLine;
			return $this->txtPortfolioImage;
		}

		/**
		 * Create and setup QLabel lblPortfolioImage
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblPortfolioImage_Create($strControlId = null) {
			$this->lblPortfolioImage = new QLabel($this->objParentObject, $strControlId);
			$this->lblPortfolioImage->Name = QApplication::Translate('Portfolio Image');
			$this->lblPortfolioImage->Text = $this->objTablePortfolio->PortfolioImage;
			return $this->lblPortfolioImage;
		}

		/**
		 * Create and setup QTextBox txtPortfolioThumnail
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtPortfolioThumnail_Create($strControlId = null) {
			$this->txtPortfolioThumnail = new QTextBox($this->objParentObject, $strControlId);
			$this->txtPortfolioThumnail->Name = QApplication::Translate('Portfolio Thumnail');
			$this->txtPortfolioThumnail->Text = $this->objTablePortfolio->PortfolioThumnail;
			$this->txtPortfolioThumnail->TextMode = QTextMode::MultiLine;
			return $this->txtPortfolioThumnail;
		}

		/**
		 * Create and setup QLabel lblPortfolioThumnail
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblPortfolioThumnail_Create($strControlId = null) {
			$this->lblPortfolioThumnail = new QLabel($this->objParentObject, $strControlId);
			$this->lblPortfolioThumnail->Name = QApplication::Translate('Portfolio Thumnail');
			$this->lblPortfolioThumnail->Text = $this->objTablePortfolio->PortfolioThumnail;
			return $this->lblPortfolioThumnail;
		}

		/**
		 * Create and setup QTextBox txtFilename
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtFilename_Create($strControlId = null) {
			$this->txtFilename = new QTextBox($this->objParentObject, $strControlId);
			$this->txtFilename->Name = QApplication::Translate('Filename');
			$this->txtFilename->Text = $this->objTablePortfolio->Filename;
			$this->txtFilename->MaxLength = TablePortfolio::FilenameMaxLength;
			return $this->txtFilename;
		}

		/**
		 * Create and setup QLabel lblFilename
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblFilename_Create($strControlId = null) {
			$this->lblFilename = new QLabel($this->objParentObject, $strControlId);
			$this->lblFilename->Name = QApplication::Translate('Filename');
			$this->lblFilename->Text = $this->objTablePortfolio->Filename;
			return $this->lblFilename;
		}

		/**
		 * Create and setup QTextBox txtFilenameThumnail
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtFilenameThumnail_Create($strControlId = null) {
			$this->txtFilenameThumnail = new QTextBox($this->objParentObject, $strControlId);
			$this->txtFilenameThumnail->Name = QApplication::Translate('Filename Thumnail');
			$this->txtFilenameThumnail->Text = $this->objTablePortfolio->FilenameThumnail;
			$this->txtFilenameThumnail->MaxLength = TablePortfolio::FilenameThumnailMaxLength;
			return $this->txtFilenameThumnail;
		}

		/**
		 * Create and setup QLabel lblFilenameThumnail
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblFilenameThumnail_Create($strControlId = null) {
			$this->lblFilenameThumnail = new QLabel($this->objParentObject, $strControlId);
			$this->lblFilenameThumnail->Name = QApplication::Translate('Filename Thumnail');
			$this->lblFilenameThumnail->Text = $this->objTablePortfolio->FilenameThumnail;
			return $this->lblFilenameThumnail;
		}

		/**
		 * Create and setup QTextBox txtUrl
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUrl_Create($strControlId = null) {
			$this->txtUrl = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUrl->Name = QApplication::Translate('Url');
			$this->txtUrl->Text = $this->objTablePortfolio->Url;
			$this->txtUrl->MaxLength = TablePortfolio::UrlMaxLength;
			return $this->txtUrl;
		}

		/**
		 * Create and setup QLabel lblUrl
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUrl_Create($strControlId = null) {
			$this->lblUrl = new QLabel($this->objParentObject, $strControlId);
			$this->lblUrl->Name = QApplication::Translate('Url');
			$this->lblUrl->Text = $this->objTablePortfolio->Url;
			return $this->lblUrl;
		}

		/**
		 * Create and setup QTextBox txtUrlThumnail
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUrlThumnail_Create($strControlId = null) {
			$this->txtUrlThumnail = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUrlThumnail->Name = QApplication::Translate('Url Thumnail');
			$this->txtUrlThumnail->Text = $this->objTablePortfolio->UrlThumnail;
			$this->txtUrlThumnail->MaxLength = TablePortfolio::UrlThumnailMaxLength;
			return $this->txtUrlThumnail;
		}

		/**
		 * Create and setup QLabel lblUrlThumnail
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUrlThumnail_Create($strControlId = null) {
			$this->lblUrlThumnail = new QLabel($this->objParentObject, $strControlId);
			$this->lblUrlThumnail->Name = QApplication::Translate('Url Thumnail');
			$this->lblUrlThumnail->Text = $this->objTablePortfolio->UrlThumnail;
			return $this->lblUrlThumnail;
		}

		/**
		 * Create and setup QTextBox txtKeyword1
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword1_Create($strControlId = null) {
			$this->txtKeyword1 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword1->Name = QApplication::Translate('Keyword 1');
			$this->txtKeyword1->Text = $this->objTablePortfolio->Keyword1;
			$this->txtKeyword1->MaxLength = TablePortfolio::Keyword1MaxLength;
			return $this->txtKeyword1;
		}

		/**
		 * Create and setup QLabel lblKeyword1
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword1_Create($strControlId = null) {
			$this->lblKeyword1 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword1->Name = QApplication::Translate('Keyword 1');
			$this->lblKeyword1->Text = $this->objTablePortfolio->Keyword1;
			return $this->lblKeyword1;
		}

		/**
		 * Create and setup QTextBox txtKeyword2
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword2_Create($strControlId = null) {
			$this->txtKeyword2 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword2->Name = QApplication::Translate('Keyword 2');
			$this->txtKeyword2->Text = $this->objTablePortfolio->Keyword2;
			$this->txtKeyword2->MaxLength = TablePortfolio::Keyword2MaxLength;
			return $this->txtKeyword2;
		}

		/**
		 * Create and setup QLabel lblKeyword2
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword2_Create($strControlId = null) {
			$this->lblKeyword2 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword2->Name = QApplication::Translate('Keyword 2');
			$this->lblKeyword2->Text = $this->objTablePortfolio->Keyword2;
			return $this->lblKeyword2;
		}

		/**
		 * Create and setup QTextBox txtKeyword3
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword3_Create($strControlId = null) {
			$this->txtKeyword3 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword3->Name = QApplication::Translate('Keyword 3');
			$this->txtKeyword3->Text = $this->objTablePortfolio->Keyword3;
			$this->txtKeyword3->MaxLength = TablePortfolio::Keyword3MaxLength;
			return $this->txtKeyword3;
		}

		/**
		 * Create and setup QLabel lblKeyword3
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword3_Create($strControlId = null) {
			$this->lblKeyword3 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword3->Name = QApplication::Translate('Keyword 3');
			$this->lblKeyword3->Text = $this->objTablePortfolio->Keyword3;
			return $this->lblKeyword3;
		}

		/**
		 * Create and setup QTextBox txtKeyword4
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword4_Create($strControlId = null) {
			$this->txtKeyword4 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword4->Name = QApplication::Translate('Keyword 4');
			$this->txtKeyword4->Text = $this->objTablePortfolio->Keyword4;
			$this->txtKeyword4->MaxLength = TablePortfolio::Keyword4MaxLength;
			return $this->txtKeyword4;
		}

		/**
		 * Create and setup QLabel lblKeyword4
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword4_Create($strControlId = null) {
			$this->lblKeyword4 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword4->Name = QApplication::Translate('Keyword 4');
			$this->lblKeyword4->Text = $this->objTablePortfolio->Keyword4;
			return $this->lblKeyword4;
		}

		/**
		 * Create and setup QTextBox txtKeyword5
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword5_Create($strControlId = null) {
			$this->txtKeyword5 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword5->Name = QApplication::Translate('Keyword 5');
			$this->txtKeyword5->Text = $this->objTablePortfolio->Keyword5;
			$this->txtKeyword5->MaxLength = TablePortfolio::Keyword5MaxLength;
			return $this->txtKeyword5;
		}

		/**
		 * Create and setup QLabel lblKeyword5
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword5_Create($strControlId = null) {
			$this->lblKeyword5 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword5->Name = QApplication::Translate('Keyword 5');
			$this->lblKeyword5->Text = $this->objTablePortfolio->Keyword5;
			return $this->lblKeyword5;
		}

		/**
		 * Create and setup QTextBox txtKeyword6
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword6_Create($strControlId = null) {
			$this->txtKeyword6 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword6->Name = QApplication::Translate('Keyword 6');
			$this->txtKeyword6->Text = $this->objTablePortfolio->Keyword6;
			$this->txtKeyword6->MaxLength = TablePortfolio::Keyword6MaxLength;
			return $this->txtKeyword6;
		}

		/**
		 * Create and setup QLabel lblKeyword6
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword6_Create($strControlId = null) {
			$this->lblKeyword6 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword6->Name = QApplication::Translate('Keyword 6');
			$this->lblKeyword6->Text = $this->objTablePortfolio->Keyword6;
			return $this->lblKeyword6;
		}

		/**
		 * Create and setup QTextBox txtKeyword7
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword7_Create($strControlId = null) {
			$this->txtKeyword7 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword7->Name = QApplication::Translate('Keyword 7');
			$this->txtKeyword7->Text = $this->objTablePortfolio->Keyword7;
			$this->txtKeyword7->MaxLength = TablePortfolio::Keyword7MaxLength;
			return $this->txtKeyword7;
		}

		/**
		 * Create and setup QLabel lblKeyword7
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword7_Create($strControlId = null) {
			$this->lblKeyword7 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword7->Name = QApplication::Translate('Keyword 7');
			$this->lblKeyword7->Text = $this->objTablePortfolio->Keyword7;
			return $this->lblKeyword7;
		}

		/**
		 * Create and setup QTextBox txtKeyword8
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword8_Create($strControlId = null) {
			$this->txtKeyword8 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword8->Name = QApplication::Translate('Keyword 8');
			$this->txtKeyword8->Text = $this->objTablePortfolio->Keyword8;
			$this->txtKeyword8->MaxLength = TablePortfolio::Keyword8MaxLength;
			return $this->txtKeyword8;
		}

		/**
		 * Create and setup QLabel lblKeyword8
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword8_Create($strControlId = null) {
			$this->lblKeyword8 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword8->Name = QApplication::Translate('Keyword 8');
			$this->lblKeyword8->Text = $this->objTablePortfolio->Keyword8;
			return $this->lblKeyword8;
		}

		/**
		 * Create and setup QTextBox txtKeyword9
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword9_Create($strControlId = null) {
			$this->txtKeyword9 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword9->Name = QApplication::Translate('Keyword 9');
			$this->txtKeyword9->Text = $this->objTablePortfolio->Keyword9;
			$this->txtKeyword9->MaxLength = TablePortfolio::Keyword9MaxLength;
			return $this->txtKeyword9;
		}

		/**
		 * Create and setup QLabel lblKeyword9
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword9_Create($strControlId = null) {
			$this->lblKeyword9 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword9->Name = QApplication::Translate('Keyword 9');
			$this->lblKeyword9->Text = $this->objTablePortfolio->Keyword9;
			return $this->lblKeyword9;
		}

		/**
		 * Create and setup QTextBox txtKeyword10
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtKeyword10_Create($strControlId = null) {
			$this->txtKeyword10 = new QTextBox($this->objParentObject, $strControlId);
			$this->txtKeyword10->Name = QApplication::Translate('Keyword 10');
			$this->txtKeyword10->Text = $this->objTablePortfolio->Keyword10;
			$this->txtKeyword10->MaxLength = TablePortfolio::Keyword10MaxLength;
			return $this->txtKeyword10;
		}

		/**
		 * Create and setup QLabel lblKeyword10
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblKeyword10_Create($strControlId = null) {
			$this->lblKeyword10 = new QLabel($this->objParentObject, $strControlId);
			$this->lblKeyword10->Name = QApplication::Translate('Keyword 10');
			$this->lblKeyword10->Text = $this->objTablePortfolio->Keyword10;
			return $this->lblKeyword10;
		}

		/**
		 * Create and setup QDateTimePicker calRegisterDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calRegisterDate_Create($strControlId = null) {
			$this->calRegisterDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calRegisterDate->Name = QApplication::Translate('Register Date');
			$this->calRegisterDate->DateTime = $this->objTablePortfolio->RegisterDate;
			$this->calRegisterDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calRegisterDate;
		}

		/**
		 * Create and setup QLabel lblRegisterDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblRegisterDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblRegisterDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblRegisterDate->Name = QApplication::Translate('Register Date');
			$this->strRegisterDateDateTimeFormat = $strDateTimeFormat;
			$this->lblRegisterDate->Text = sprintf($this->objTablePortfolio->RegisterDate) ? $this->objTablePortfolio->RegisterDate->__toString($this->strRegisterDateDateTimeFormat) : null;
			return $this->lblRegisterDate;
		}

		protected $strRegisterDateDateTimeFormat;


		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objTablePortfolio->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objTablePortfolio->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}

		/**
		 * Create and setup QTextBox txtActive
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtActive_Create($strControlId = null) {
			$this->txtActive = new QTextBox($this->objParentObject, $strControlId);
			$this->txtActive->Name = QApplication::Translate('Active');
			$this->txtActive->Text = $this->objTablePortfolio->Active;
			$this->txtActive->Required = true;
			$this->txtActive->MaxLength = TablePortfolio::ActiveMaxLength;
			return $this->txtActive;
		}

		/**
		 * Create and setup QLabel lblActive
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblActive_Create($strControlId = null) {
			$this->lblActive = new QLabel($this->objParentObject, $strControlId);
			$this->lblActive->Name = QApplication::Translate('Active');
			$this->lblActive->Text = $this->objTablePortfolio->Active;
			$this->lblActive->Required = true;
			return $this->lblActive;
		}



		/**
		 * Refresh this MetaControl with Data from the local TablePortfolio object.
		 * @param boolean $blnReload reload TablePortfolio from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTablePortfolio->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTablePortfolio->Id;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTablePortfolio->User) && ($this->objTablePortfolio->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTablePortfolio->User) ? $this->objTablePortfolio->User->__toString() : null;

			if ($this->txtBoothId) $this->txtBoothId->Text = $this->objTablePortfolio->BoothId;
			if ($this->lblBoothId) $this->lblBoothId->Text = $this->objTablePortfolio->BoothId;

			if ($this->txtCategoryId) $this->txtCategoryId->Text = $this->objTablePortfolio->CategoryId;
			if ($this->lblCategoryId) $this->lblCategoryId->Text = $this->objTablePortfolio->CategoryId;

			if ($this->txtSubcategoryId) $this->txtSubcategoryId->Text = $this->objTablePortfolio->SubcategoryId;
			if ($this->lblSubcategoryId) $this->lblSubcategoryId->Text = $this->objTablePortfolio->SubcategoryId;

			if ($this->txtColorsId) $this->txtColorsId->Text = $this->objTablePortfolio->ColorsId;
			if ($this->lblColorsId) $this->lblColorsId->Text = $this->objTablePortfolio->ColorsId;

			if ($this->txtFeelsId) $this->txtFeelsId->Text = $this->objTablePortfolio->FeelsId;
			if ($this->lblFeelsId) $this->lblFeelsId->Text = $this->objTablePortfolio->FeelsId;

			if ($this->txtPortfolioCategoryId) $this->txtPortfolioCategoryId->Text = $this->objTablePortfolio->PortfolioCategoryId;
			if ($this->lblPortfolioCategoryId) $this->lblPortfolioCategoryId->Text = $this->objTablePortfolio->PortfolioCategoryId;

			if ($this->txtTitle) $this->txtTitle->Text = $this->objTablePortfolio->Title;
			if ($this->lblTitle) $this->lblTitle->Text = $this->objTablePortfolio->Title;

			if ($this->txtPortfolioImage) $this->txtPortfolioImage->Text = $this->objTablePortfolio->PortfolioImage;
			if ($this->lblPortfolioImage) $this->lblPortfolioImage->Text = $this->objTablePortfolio->PortfolioImage;

			if ($this->txtPortfolioThumnail) $this->txtPortfolioThumnail->Text = $this->objTablePortfolio->PortfolioThumnail;
			if ($this->lblPortfolioThumnail) $this->lblPortfolioThumnail->Text = $this->objTablePortfolio->PortfolioThumnail;

			if ($this->txtFilename) $this->txtFilename->Text = $this->objTablePortfolio->Filename;
			if ($this->lblFilename) $this->lblFilename->Text = $this->objTablePortfolio->Filename;

			if ($this->txtFilenameThumnail) $this->txtFilenameThumnail->Text = $this->objTablePortfolio->FilenameThumnail;
			if ($this->lblFilenameThumnail) $this->lblFilenameThumnail->Text = $this->objTablePortfolio->FilenameThumnail;

			if ($this->txtUrl) $this->txtUrl->Text = $this->objTablePortfolio->Url;
			if ($this->lblUrl) $this->lblUrl->Text = $this->objTablePortfolio->Url;

			if ($this->txtUrlThumnail) $this->txtUrlThumnail->Text = $this->objTablePortfolio->UrlThumnail;
			if ($this->lblUrlThumnail) $this->lblUrlThumnail->Text = $this->objTablePortfolio->UrlThumnail;

			if ($this->txtKeyword1) $this->txtKeyword1->Text = $this->objTablePortfolio->Keyword1;
			if ($this->lblKeyword1) $this->lblKeyword1->Text = $this->objTablePortfolio->Keyword1;

			if ($this->txtKeyword2) $this->txtKeyword2->Text = $this->objTablePortfolio->Keyword2;
			if ($this->lblKeyword2) $this->lblKeyword2->Text = $this->objTablePortfolio->Keyword2;

			if ($this->txtKeyword3) $this->txtKeyword3->Text = $this->objTablePortfolio->Keyword3;
			if ($this->lblKeyword3) $this->lblKeyword3->Text = $this->objTablePortfolio->Keyword3;

			if ($this->txtKeyword4) $this->txtKeyword4->Text = $this->objTablePortfolio->Keyword4;
			if ($this->lblKeyword4) $this->lblKeyword4->Text = $this->objTablePortfolio->Keyword4;

			if ($this->txtKeyword5) $this->txtKeyword5->Text = $this->objTablePortfolio->Keyword5;
			if ($this->lblKeyword5) $this->lblKeyword5->Text = $this->objTablePortfolio->Keyword5;

			if ($this->txtKeyword6) $this->txtKeyword6->Text = $this->objTablePortfolio->Keyword6;
			if ($this->lblKeyword6) $this->lblKeyword6->Text = $this->objTablePortfolio->Keyword6;

			if ($this->txtKeyword7) $this->txtKeyword7->Text = $this->objTablePortfolio->Keyword7;
			if ($this->lblKeyword7) $this->lblKeyword7->Text = $this->objTablePortfolio->Keyword7;

			if ($this->txtKeyword8) $this->txtKeyword8->Text = $this->objTablePortfolio->Keyword8;
			if ($this->lblKeyword8) $this->lblKeyword8->Text = $this->objTablePortfolio->Keyword8;

			if ($this->txtKeyword9) $this->txtKeyword9->Text = $this->objTablePortfolio->Keyword9;
			if ($this->lblKeyword9) $this->lblKeyword9->Text = $this->objTablePortfolio->Keyword9;

			if ($this->txtKeyword10) $this->txtKeyword10->Text = $this->objTablePortfolio->Keyword10;
			if ($this->lblKeyword10) $this->lblKeyword10->Text = $this->objTablePortfolio->Keyword10;

			if ($this->calRegisterDate) $this->calRegisterDate->DateTime = $this->objTablePortfolio->RegisterDate;
			if ($this->lblRegisterDate) $this->lblRegisterDate->Text = sprintf($this->objTablePortfolio->RegisterDate) ? $this->objTablePortfolio->RegisterDate->__toString($this->strRegisterDateDateTimeFormat) : null;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objTablePortfolio->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objTablePortfolio->Status;

			if ($this->txtActive) $this->txtActive->Text = $this->objTablePortfolio->Active;
			if ($this->lblActive) $this->lblActive->Text = $this->objTablePortfolio->Active;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEPORTFOLIO OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TablePortfolio instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTablePortfolio() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstUser) $this->objTablePortfolio->UserId = $this->lstUser->SelectedValue;
				if ($this->txtBoothId) $this->objTablePortfolio->BoothId = $this->txtBoothId->Text;
				if ($this->txtCategoryId) $this->objTablePortfolio->CategoryId = $this->txtCategoryId->Text;
				if ($this->txtSubcategoryId) $this->objTablePortfolio->SubcategoryId = $this->txtSubcategoryId->Text;
				if ($this->txtColorsId) $this->objTablePortfolio->ColorsId = $this->txtColorsId->Text;
				if ($this->txtFeelsId) $this->objTablePortfolio->FeelsId = $this->txtFeelsId->Text;
				if ($this->txtPortfolioCategoryId) $this->objTablePortfolio->PortfolioCategoryId = $this->txtPortfolioCategoryId->Text;
				if ($this->txtTitle) $this->objTablePortfolio->Title = $this->txtTitle->Text;
				if ($this->txtPortfolioImage) $this->objTablePortfolio->PortfolioImage = $this->txtPortfolioImage->Text;
				if ($this->txtPortfolioThumnail) $this->objTablePortfolio->PortfolioThumnail = $this->txtPortfolioThumnail->Text;
				if ($this->txtFilename) $this->objTablePortfolio->Filename = $this->txtFilename->Text;
				if ($this->txtFilenameThumnail) $this->objTablePortfolio->FilenameThumnail = $this->txtFilenameThumnail->Text;
				if ($this->txtUrl) $this->objTablePortfolio->Url = $this->txtUrl->Text;
				if ($this->txtUrlThumnail) $this->objTablePortfolio->UrlThumnail = $this->txtUrlThumnail->Text;
				if ($this->txtKeyword1) $this->objTablePortfolio->Keyword1 = $this->txtKeyword1->Text;
				if ($this->txtKeyword2) $this->objTablePortfolio->Keyword2 = $this->txtKeyword2->Text;
				if ($this->txtKeyword3) $this->objTablePortfolio->Keyword3 = $this->txtKeyword3->Text;
				if ($this->txtKeyword4) $this->objTablePortfolio->Keyword4 = $this->txtKeyword4->Text;
				if ($this->txtKeyword5) $this->objTablePortfolio->Keyword5 = $this->txtKeyword5->Text;
				if ($this->txtKeyword6) $this->objTablePortfolio->Keyword6 = $this->txtKeyword6->Text;
				if ($this->txtKeyword7) $this->objTablePortfolio->Keyword7 = $this->txtKeyword7->Text;
				if ($this->txtKeyword8) $this->objTablePortfolio->Keyword8 = $this->txtKeyword8->Text;
				if ($this->txtKeyword9) $this->objTablePortfolio->Keyword9 = $this->txtKeyword9->Text;
				if ($this->txtKeyword10) $this->objTablePortfolio->Keyword10 = $this->txtKeyword10->Text;
				if ($this->calRegisterDate) $this->objTablePortfolio->RegisterDate = $this->calRegisterDate->DateTime;
				if ($this->txtStatus) $this->objTablePortfolio->Status = $this->txtStatus->Text;
				if ($this->txtActive) $this->objTablePortfolio->Active = $this->txtActive->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TablePortfolio object
				$this->objTablePortfolio->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TablePortfolio instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTablePortfolio() {
			$this->objTablePortfolio->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TablePortfolio': return $this->objTablePortfolio;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TablePortfolio fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'BoothIdControl':
					if (!$this->txtBoothId) return $this->txtBoothId_Create();
					return $this->txtBoothId;
				case 'BoothIdLabel':
					if (!$this->lblBoothId) return $this->lblBoothId_Create();
					return $this->lblBoothId;
				case 'CategoryIdControl':
					if (!$this->txtCategoryId) return $this->txtCategoryId_Create();
					return $this->txtCategoryId;
				case 'CategoryIdLabel':
					if (!$this->lblCategoryId) return $this->lblCategoryId_Create();
					return $this->lblCategoryId;
				case 'SubcategoryIdControl':
					if (!$this->txtSubcategoryId) return $this->txtSubcategoryId_Create();
					return $this->txtSubcategoryId;
				case 'SubcategoryIdLabel':
					if (!$this->lblSubcategoryId) return $this->lblSubcategoryId_Create();
					return $this->lblSubcategoryId;
				case 'ColorsIdControl':
					if (!$this->txtColorsId) return $this->txtColorsId_Create();
					return $this->txtColorsId;
				case 'ColorsIdLabel':
					if (!$this->lblColorsId) return $this->lblColorsId_Create();
					return $this->lblColorsId;
				case 'FeelsIdControl':
					if (!$this->txtFeelsId) return $this->txtFeelsId_Create();
					return $this->txtFeelsId;
				case 'FeelsIdLabel':
					if (!$this->lblFeelsId) return $this->lblFeelsId_Create();
					return $this->lblFeelsId;
				case 'PortfolioCategoryIdControl':
					if (!$this->txtPortfolioCategoryId) return $this->txtPortfolioCategoryId_Create();
					return $this->txtPortfolioCategoryId;
				case 'PortfolioCategoryIdLabel':
					if (!$this->lblPortfolioCategoryId) return $this->lblPortfolioCategoryId_Create();
					return $this->lblPortfolioCategoryId;
				case 'TitleControl':
					if (!$this->txtTitle) return $this->txtTitle_Create();
					return $this->txtTitle;
				case 'TitleLabel':
					if (!$this->lblTitle) return $this->lblTitle_Create();
					return $this->lblTitle;
				case 'PortfolioImageControl':
					if (!$this->txtPortfolioImage) return $this->txtPortfolioImage_Create();
					return $this->txtPortfolioImage;
				case 'PortfolioImageLabel':
					if (!$this->lblPortfolioImage) return $this->lblPortfolioImage_Create();
					return $this->lblPortfolioImage;
				case 'PortfolioThumnailControl':
					if (!$this->txtPortfolioThumnail) return $this->txtPortfolioThumnail_Create();
					return $this->txtPortfolioThumnail;
				case 'PortfolioThumnailLabel':
					if (!$this->lblPortfolioThumnail) return $this->lblPortfolioThumnail_Create();
					return $this->lblPortfolioThumnail;
				case 'FilenameControl':
					if (!$this->txtFilename) return $this->txtFilename_Create();
					return $this->txtFilename;
				case 'FilenameLabel':
					if (!$this->lblFilename) return $this->lblFilename_Create();
					return $this->lblFilename;
				case 'FilenameThumnailControl':
					if (!$this->txtFilenameThumnail) return $this->txtFilenameThumnail_Create();
					return $this->txtFilenameThumnail;
				case 'FilenameThumnailLabel':
					if (!$this->lblFilenameThumnail) return $this->lblFilenameThumnail_Create();
					return $this->lblFilenameThumnail;
				case 'UrlControl':
					if (!$this->txtUrl) return $this->txtUrl_Create();
					return $this->txtUrl;
				case 'UrlLabel':
					if (!$this->lblUrl) return $this->lblUrl_Create();
					return $this->lblUrl;
				case 'UrlThumnailControl':
					if (!$this->txtUrlThumnail) return $this->txtUrlThumnail_Create();
					return $this->txtUrlThumnail;
				case 'UrlThumnailLabel':
					if (!$this->lblUrlThumnail) return $this->lblUrlThumnail_Create();
					return $this->lblUrlThumnail;
				case 'Keyword1Control':
					if (!$this->txtKeyword1) return $this->txtKeyword1_Create();
					return $this->txtKeyword1;
				case 'Keyword1Label':
					if (!$this->lblKeyword1) return $this->lblKeyword1_Create();
					return $this->lblKeyword1;
				case 'Keyword2Control':
					if (!$this->txtKeyword2) return $this->txtKeyword2_Create();
					return $this->txtKeyword2;
				case 'Keyword2Label':
					if (!$this->lblKeyword2) return $this->lblKeyword2_Create();
					return $this->lblKeyword2;
				case 'Keyword3Control':
					if (!$this->txtKeyword3) return $this->txtKeyword3_Create();
					return $this->txtKeyword3;
				case 'Keyword3Label':
					if (!$this->lblKeyword3) return $this->lblKeyword3_Create();
					return $this->lblKeyword3;
				case 'Keyword4Control':
					if (!$this->txtKeyword4) return $this->txtKeyword4_Create();
					return $this->txtKeyword4;
				case 'Keyword4Label':
					if (!$this->lblKeyword4) return $this->lblKeyword4_Create();
					return $this->lblKeyword4;
				case 'Keyword5Control':
					if (!$this->txtKeyword5) return $this->txtKeyword5_Create();
					return $this->txtKeyword5;
				case 'Keyword5Label':
					if (!$this->lblKeyword5) return $this->lblKeyword5_Create();
					return $this->lblKeyword5;
				case 'Keyword6Control':
					if (!$this->txtKeyword6) return $this->txtKeyword6_Create();
					return $this->txtKeyword6;
				case 'Keyword6Label':
					if (!$this->lblKeyword6) return $this->lblKeyword6_Create();
					return $this->lblKeyword6;
				case 'Keyword7Control':
					if (!$this->txtKeyword7) return $this->txtKeyword7_Create();
					return $this->txtKeyword7;
				case 'Keyword7Label':
					if (!$this->lblKeyword7) return $this->lblKeyword7_Create();
					return $this->lblKeyword7;
				case 'Keyword8Control':
					if (!$this->txtKeyword8) return $this->txtKeyword8_Create();
					return $this->txtKeyword8;
				case 'Keyword8Label':
					if (!$this->lblKeyword8) return $this->lblKeyword8_Create();
					return $this->lblKeyword8;
				case 'Keyword9Control':
					if (!$this->txtKeyword9) return $this->txtKeyword9_Create();
					return $this->txtKeyword9;
				case 'Keyword9Label':
					if (!$this->lblKeyword9) return $this->lblKeyword9_Create();
					return $this->lblKeyword9;
				case 'Keyword10Control':
					if (!$this->txtKeyword10) return $this->txtKeyword10_Create();
					return $this->txtKeyword10;
				case 'Keyword10Label':
					if (!$this->lblKeyword10) return $this->lblKeyword10_Create();
					return $this->lblKeyword10;
				case 'RegisterDateControl':
					if (!$this->calRegisterDate) return $this->calRegisterDate_Create();
					return $this->calRegisterDate;
				case 'RegisterDateLabel':
					if (!$this->lblRegisterDate) return $this->lblRegisterDate_Create();
					return $this->lblRegisterDate;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				case 'ActiveControl':
					if (!$this->txtActive) return $this->txtActive_Create();
					return $this->txtActive;
				case 'ActiveLabel':
					if (!$this->lblActive) return $this->lblActive_Create();
					return $this->lblActive;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TablePortfolio fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'BoothIdControl':
						return ($this->txtBoothId = QType::Cast($mixValue, 'QControl'));
					case 'CategoryIdControl':
						return ($this->txtCategoryId = QType::Cast($mixValue, 'QControl'));
					case 'SubcategoryIdControl':
						return ($this->txtSubcategoryId = QType::Cast($mixValue, 'QControl'));
					case 'ColorsIdControl':
						return ($this->txtColorsId = QType::Cast($mixValue, 'QControl'));
					case 'FeelsIdControl':
						return ($this->txtFeelsId = QType::Cast($mixValue, 'QControl'));
					case 'PortfolioCategoryIdControl':
						return ($this->txtPortfolioCategoryId = QType::Cast($mixValue, 'QControl'));
					case 'TitleControl':
						return ($this->txtTitle = QType::Cast($mixValue, 'QControl'));
					case 'PortfolioImageControl':
						return ($this->txtPortfolioImage = QType::Cast($mixValue, 'QControl'));
					case 'PortfolioThumnailControl':
						return ($this->txtPortfolioThumnail = QType::Cast($mixValue, 'QControl'));
					case 'FilenameControl':
						return ($this->txtFilename = QType::Cast($mixValue, 'QControl'));
					case 'FilenameThumnailControl':
						return ($this->txtFilenameThumnail = QType::Cast($mixValue, 'QControl'));
					case 'UrlControl':
						return ($this->txtUrl = QType::Cast($mixValue, 'QControl'));
					case 'UrlThumnailControl':
						return ($this->txtUrlThumnail = QType::Cast($mixValue, 'QControl'));
					case 'Keyword1Control':
						return ($this->txtKeyword1 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword2Control':
						return ($this->txtKeyword2 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword3Control':
						return ($this->txtKeyword3 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword4Control':
						return ($this->txtKeyword4 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword5Control':
						return ($this->txtKeyword5 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword6Control':
						return ($this->txtKeyword6 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword7Control':
						return ($this->txtKeyword7 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword8Control':
						return ($this->txtKeyword8 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword9Control':
						return ($this->txtKeyword9 = QType::Cast($mixValue, 'QControl'));
					case 'Keyword10Control':
						return ($this->txtKeyword10 = QType::Cast($mixValue, 'QControl'));
					case 'RegisterDateControl':
						return ($this->calRegisterDate = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					case 'ActiveControl':
						return ($this->txtActive = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>